<?php
class CodeSpace_ServiceServer_Controller_Plugin_Service extends Zend_Controller_Plugin_Abstract
{
    public function __construct ()
    {}
    
    public function preDispatch (Zend_Controller_Request_Abstract $request)
    {
        // Creating Server
        $oauthServer = new CodeSpace_Oauth_Server_Service();
        $oauthServer->setRequest();
        
        $consumer = $oauthServer->getConsumer();
        $arrayAuthentication = $consumer->createArrayAuthentication();
        $arrayAuthentication->addConsumer('consumer-key', 'consumer-secret');
        
        $oauthServer->handle();
    }
}
?>